﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _3._5._1_ref参数
{
    internal class Program
    {
        static void Main(string[] args)
        {
            A a=new A { X=1};
            ChangeA(ref a);
            Console.WriteLine($"a1.X:{a.X}");

            Console.ReadKey();
        }
        public static void ChangeA(ref A a)
        {
            a.X = 2;
        }

        public struct A
        {
            public int X {  get; set; }
        }
    }
}
